home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Freeware / Miro 1.0 / Miro_Installer.exe / xulrunner / python / compiled_templates / guide_loading.py < prev    next >
Encoding:
Python Source  |  2007-11-12  |  1.9 KB  |  48 lines

  1. # This is a generated file. Do not edit.
  2. from template import Handle, fillAttr, quoteAndFillAttr, fillStaticTemplate
  3. from StringIO import StringIO
  4. from xhtmltools import urlencode
  5. from templatehelper import quoteattr, escape
  6. from string import Template
  7. import app
  8. import views
  9. import sorts
  10. import indexes
  11. import filters
  12. import resources
  13. import gtcache
  14. _ = gtcache.gettext
  15. def fillTemplate(domHandler, dtvPlatform, eventCookie, bodyTagExtra, *args, **kargs):
  16.     # Start of handle
  17.  
  18.     # Start user code
  19.     
  20.     guide = views.guides.getObjectByID(int(kargs['id']))
  21.     # End user code
  22.  
  23.     localvars = locals()
  24.     localvars.update(globals())
  25.     handle = Handle(domHandler, localvars, onUnlink = lambda:None)
  26.  
  27.  
  28.  
  29.     out = StringIO()
  30.     out.write(u"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n")
  31.     out.write(u'<html dtvPlatform="')
  32.     out.write(quoteattr(urlencode(dtvPlatform)))
  33.     out.write(u'" eventCookie="')
  34.     out.write(quoteattr(urlencode(eventCookie)))
  35.     out.write(u'" xmlns:t="http://www.participatorypolitics.org/" xmlns="http://www.w3.org/1999/xhtml" xmlns:i18n="http://www.participatoryculture.org/i18n">\n<head>\n    \n<meta content="text/html; charset=utf-8" http-equiv="content-type"></meta>\n<meta content="0;url=')
  36.     out.write(quoteattr(guide.getLastVisitedURL()))
  37.     out.write(u'" http-equiv="refresh"></meta>\n<link href="')
  38.     out.write(quoteattr(resources.url(u'css/style.css')))
  39.     out.write(u'" type="text/css" rel="stylesheet"></link>\n</head>\n<body class="channel-guide-body"')
  40.     out.write(u" " + bodyTagExtra)
  41.     out.write(u'>\n\t<div id="channel-guide-loading-image">\n\t\t<span id="channel-guide-loading-text">')
  42.     out.write(_(u'Loading Miro Guide'))
  43.     out.write(u'</span>\n\t</div>\n</body>\n</html>')
  44.     out.seek(0)
  45.  
  46.  
  47.     return (out, handle)
  48.